package com.szgr.baoyin.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.szgr.baoyin.R;
import com.szgr.baoyin.utils.Constant;

/**
 * 都银卡条款
 */
public class VipArticleActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_vip_article);
        super.onCreate(savedInstanceState);
    }

    @Override
    public void initActionBar() {
        actionBarTitle.setText("都银卡条款");
    }

    @Override
    public void initView() {
        WebView webView = (WebView) findViewById(R.id.vip_article_web_view);
//        webView.setInitialScale(25);
        WebSettings settings = webView.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setBuiltInZoomControls(true);
        webView.loadUrl(Constant.URL_VIP_02);

        findViewById(R.id.vip_article_apply_vip).setOnClickListener(this);
        findViewById(R.id.vip_article_back).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.vip_article_back:
            case R.id.action_bar_left:
                finish();
                break;
            case R.id.vip_article_apply_vip:
                startActivity(new Intent(this,VipApplyActivity.class));
                break;
        }
    }
}
